﻿using System;
using System.Collections.Generic;
using TaleWorlds.CampaignSystem.CharacterDevelopment;
using TaleWorlds.CampaignSystem.Map;
using TaleWorlds.CampaignSystem.MapEvents;
using TaleWorlds.CampaignSystem.Roster;
using TaleWorlds.CampaignSystem.Settlements;
using TaleWorlds.CampaignSystem.Siege;
using TaleWorlds.Core;
using TaleWorlds.Library;
using TaleWorlds.Localization;
using TaleWorlds.SaveSystem;
using TaleWorlds.SaveSystem.Load;

namespace TaleWorlds.CampaignSystem.Party
{
	// Token: 0x0200029B RID: 667
	public sealed class PartyBase : IBattleCombatant, IRandomOwner
	{
		// Token: 0x0600263F RID: 9791 RVA: 0x000A362E File Offset: 0x000A182E
		internal static void AutoGeneratedStaticCollectObjectsPartyBase(object o, List<object> collectedObjects)
		{
			((PartyBase)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
		}

		// Token: 0x06002640 RID: 9792 RVA: 0x000A363C File Offset: 0x000A183C
		private void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
		{
			CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this._lastEatingTime, collectedObjects);
			collectedObjects.Add(this._customOwner);
			collectedObjects.Add(this._mapEventSide);
			collectedObjects.Add(this.Settlement);
			collectedObjects.Add(this.MobileParty);
			collectedObjects.Add(this.MemberRoster);
			collectedObjects.Add(this.PrisonRoster);
			collectedObjects.Add(this.ItemRoster);
		}

		// Token: 0x06002641 RID: 9793 RVA: 0x000A36AE File Offset: 0x000A18AE
		internal static object AutoGeneratedGetMemberValueSettlement(object o)
		{
			return ((PartyBase)o).Settlement;
		}

		// Token: 0x06002642 RID: 9794 RVA: 0x000A36BB File Offset: 0x000A18BB
		internal static object AutoGeneratedGetMemberValueMobileParty(object o)
		{
			return ((PartyBase)o).MobileParty;
		}

		// Token: 0x06002643 RID: 9795 RVA: 0x000A36C8 File Offset: 0x000A18C8
		internal static object AutoGeneratedGetMemberValueMemberRoster(object o)
		{
			return ((PartyBase)o).MemberRoster;
		}

		// Token: 0x06002644 RID: 9796 RVA: 0x000A36D5 File Offset: 0x000A18D5
		internal static object AutoGeneratedGetMemberValuePrisonRoster(object o)
		{
			return ((PartyBase)o).PrisonRoster;
		}

		// Token: 0x06002645 RID: 9797 RVA: 0x000A36E2 File Offset: 0x000A18E2
		internal static object AutoGeneratedGetMemberValueItemRoster(object o)
		{
			return ((PartyBase)o).ItemRoster;
		}

		// Token: 0x06002646 RID: 9798 RVA: 0x000A36EF File Offset: 0x000A18EF
		internal static object AutoGeneratedGetMemberValueRandomValue(object o)
		{
			return ((PartyBase)o).RandomValue;
		}

		// Token: 0x06002647 RID: 9799 RVA: 0x000A3701 File Offset: 0x000A1901
		internal static object AutoGeneratedGetMemberValueAverageBearingRotation(object o)
		{
			return ((PartyBase)o).AverageBearingRotation;
		}

		// Token: 0x06002648 RID: 9800 RVA: 0x000A3713 File Offset: 0x000A1913
		internal static object AutoGeneratedGetMemberValue_remainingFoodPercentage(object o)
		{
			return ((PartyBase)o)._remainingFoodPercentage;
		}

		// Token: 0x06002649 RID: 9801 RVA: 0x000A3725 File Offset: 0x000A1925
		internal static object AutoGeneratedGetMemberValue_lastEatingTime(object o)
		{
			return ((PartyBase)o)._lastEatingTime;
		}

		// Token: 0x0600264A RID: 9802 RVA: 0x000A3737 File Offset: 0x000A1937
		internal static object AutoGeneratedGetMemberValue_customOwner(object o)
		{
			return ((PartyBase)o)._customOwner;
		}

		// Token: 0x0600264B RID: 9803 RVA: 0x000A3744 File Offset: 0x000A1944
		internal static object AutoGeneratedGetMemberValue_index(object o)
		{
			return ((PartyBase)o)._index;
		}

		// Token: 0x0600264C RID: 9804 RVA: 0x000A3756 File Offset: 0x000A1956
		internal static object AutoGeneratedGetMemberValue_mapEventSide(object o)
		{
			return ((PartyBase)o)._mapEventSide;
		}

		// Token: 0x0600264D RID: 9805 RVA: 0x000A3763 File Offset: 0x000A1963
		internal static object AutoGeneratedGetMemberValue_numberOfMenWithHorse(object o)
		{
			return ((PartyBase)o)._numberOfMenWithHorse;
		}

		// Token: 0x17000996 RID: 2454
		// (get) Token: 0x0600264E RID: 9806 RVA: 0x000A3775 File Offset: 0x000A1975
		public Vec2 Position2D
		{
			get
			{
				if (!this.IsMobile)
				{
					return this.Settlement.Position2D;
				}
				return this.MobileParty.Position2D;
			}
		}

		// Token: 0x17000997 RID: 2455
		// (get) Token: 0x0600264F RID: 9807 RVA: 0x000A3796 File Offset: 0x000A1996
		public bool IsVisible
		{
			get
			{
				if (!this.IsMobile)
				{
					return this.Settlement.IsVisible;
				}
				return this.MobileParty.IsVisible;
			}
		}

		// Token: 0x17000998 RID: 2456
		// (get) Token: 0x06002650 RID: 9808 RVA: 0x000A37B7 File Offset: 0x000A19B7
		public bool IsActive
		{
			get
			{
				if (!this.IsMobile)
				{
					return this.Settlement.IsActive;
				}
				return this.MobileParty.IsActive;
			}
		}

		// Token: 0x17000999 RID: 2457
		// (get) Token: 0x06002651 RID: 9809 RVA: 0x000A37D8 File Offset: 0x000A19D8
		public SiegeEvent SiegeEvent
		{
			get
			{
				if (!this.IsMobile)
				{
					return this.Settlement.SiegeEvent;
				}
				return this.MobileParty.SiegeEvent;
			}
		}

		// Token: 0x06002652 RID: 9810 RVA: 0x000A37F9 File Offset: 0x000A19F9
		public void OnVisibilityChanged(bool value)
		{
			MapEvent mapEvent = this.MapEvent;
			if (mapEvent != null)
			{
				mapEvent.PartyVisibilityChanged(this, value);
			}
			CampaignEventDispatcher.Instance.OnPartyVisibilityChanged(this);
			this.SetVisualAsDirty();
		}

		// Token: 0x1700099A RID: 2458
		// (get) Token: 0x06002653 RID: 9811 RVA: 0x000A381F File Offset: 0x000A1A1F
		// (set) Token: 0x06002654 RID: 9812 RVA: 0x000A3827 File Offset: 0x000A1A27
		[SaveableProperty(1)]
		public Settlement Settlement { get; private set; }

		// Token: 0x1700099B RID: 2459
		// (get) Token: 0x06002655 RID: 9813 RVA: 0x000A3830 File Offset: 0x000A1A30
		// (set) Token: 0x06002656 RID: 9814 RVA: 0x000A3838 File Offset: 0x000A1A38
		[SaveableProperty(2)]
		public MobileParty MobileParty { get; private set; }

		// Token: 0x1700099C RID: 2460
		// (get) Token: 0x06002657 RID: 9815 RVA: 0x000A3841 File Offset: 0x000A1A41
		public bool IsSettlement
		{
			get
			{
				return this.Settlement != null;
			}
		}

		// Token: 0x1700099D RID: 2461
		// (get) Token: 0x06002658 RID: 9816 RVA: 0x000A384C File Offset: 0x000A1A4C
		public bool IsMobile
		{
			get
			{
				return this.MobileParty != null;
			}
		}

		// Token: 0x1700099E RID: 2462
		// (get) Token: 0x06002659 RID: 9817 RVA: 0x000A3857 File Offset: 0x000A1A57
		// (set) Token: 0x0600265A RID: 9818 RVA: 0x000A385F File Offset: 0x000A1A5F
		[SaveableProperty(3)]
		public TroopRoster MemberRoster { get; private set; }

		// Token: 0x1700099F RID: 2463
		// (get) Token: 0x0600265B RID: 9819 RVA: 0x000A3868 File Offset: 0x000A1A68
		// (set) Token: 0x0600265C RID: 9820 RVA: 0x000A3870 File Offset: 0x000A1A70
		[SaveableProperty(4)]
		public TroopRoster PrisonRoster { get; private set; }

		// Token: 0x170009A0 RID: 2464
		// (get) Token: 0x0600265D RID: 9821 RVA: 0x000A3879 File Offset: 0x000A1A79
		// (set) Token: 0x0600265E RID: 9822 RVA: 0x000A3881 File Offset: 0x000A1A81
		[SaveableProperty(5)]
		public ItemRoster ItemRoster { get; private set; }

		// Token: 0x170009A1 RID: 2465
		// (get) Token: 0x0600265F RID: 9823 RVA: 0x000A388A File Offset: 0x000A1A8A
		public TextObject Name
		{
			get
			{
				if (this.IsSettlement)
				{
					return this.Settlement.Name;
				}
				if (!this.IsMobile)
				{
					return TextObject.Empty;
				}
				return this.MobileParty.Name;
			}
		}

		// Token: 0x170009A2 RID: 2466
		// (get) Token: 0x06002660 RID: 9824 RVA: 0x000A38B9 File Offset: 0x000A1AB9
		public float DaysStarving
		{
			get
			{
				if (!this.IsStarving)
				{
					return 0f;
				}
				return this._lastEatingTime.ElapsedDaysUntilNow;
			}
		}

		// Token: 0x06002661 RID: 9825 RVA: 0x000A38D4 File Offset: 0x000A1AD4
		public void OnConsumedFood()
		{
			this._lastEatingTime = CampaignTime.Now;
		}

		// Token: 0x170009A3 RID: 2467
		// (get) Token: 0x06002662 RID: 9826 RVA: 0x000A38E1 File Offset: 0x000A1AE1
		// (set) Token: 0x06002663 RID: 9827 RVA: 0x000A38E9 File Offset: 0x000A1AE9
		public int RemainingFoodPercentage
		{
			get
			{
				return this._remainingFoodPercentage;
			}
			set
			{
				this._remainingFoodPercentage = value;
			}
		}

		// Token: 0x170009A4 RID: 2468
		// (get) Token: 0x06002664 RID: 9828 RVA: 0x000A38F2 File Offset: 0x000A1AF2
		public bool IsStarving
		{
			get
			{
				return this._remainingFoodPercentage < 0;
			}
		}

		// Token: 0x170009A5 RID: 2469
		// (get) Token: 0x06002665 RID: 9829 RVA: 0x000A38FD File Offset: 0x000A1AFD
		public string Id
		{
			get
			{
				MobileParty mobileParty = this.MobileParty;
				return ((mobileParty != null) ? mobileParty.StringId : null) ?? this.Settlement.StringId;
			}
		}

		// Token: 0x170009A6 RID: 2470
		// (get) Token: 0x06002666 RID: 9830 RVA: 0x000A3920 File Offset: 0x000A1B20
		public Hero Owner
		{
			get
			{
				Hero result;
				if ((result = this._customOwner) == null)
				{
					if (!this.IsMobile)
					{
						return this.Settlement.Owner;
					}
					result = this.MobileParty.Owner;
				}
				return result;
			}
		}

		// Token: 0x06002667 RID: 9831 RVA: 0x000A394B File Offset: 0x000A1B4B
		public void SetCustomOwner(Hero customOwner)
		{
			this._customOwner = customOwner;
		}

		// Token: 0x170009A7 RID: 2471
		// (get) Token: 0x06002668 RID: 9832 RVA: 0x000A3954 File Offset: 0x000A1B54
		public Hero LeaderHero
		{
			get
			{
				MobileParty mobileParty = this.MobileParty;
				if (mobileParty == null)
				{
					return null;
				}
				return mobileParty.LeaderHero;
			}
		}

		// Token: 0x170009A8 RID: 2472
		// (get) Token: 0x06002669 RID: 9833 RVA: 0x000A3967 File Offset: 0x000A1B67
		public static PartyBase MainParty
		{
			get
			{
				if (Campaign.Current == null)
				{
					return null;
				}
				return Campaign.Current.MainParty.Party;
			}
		}

		// Token: 0x170009A9 RID: 2473
		// (get) Token: 0x0600266A RID: 9834 RVA: 0x000A3981 File Offset: 0x000A1B81
		// (set) Token: 0x0600266B RID: 9835 RVA: 0x000A3989 File Offset: 0x000A1B89
		public bool LevelMaskIsDirty { get; private set; }

		// Token: 0x0600266C RID: 9836 RVA: 0x000A3992 File Offset: 0x000A1B92
		public void SetLevelMaskIsDirty()
		{
			this.LevelMaskIsDirty = true;
		}

		// Token: 0x0600266D RID: 9837 RVA: 0x000A399B File Offset: 0x000A1B9B
		public void OnLevelMaskUpdated()
		{
			this.LevelMaskIsDirty = false;
		}

		// Token: 0x170009AA RID: 2474
		// (get) Token: 0x0600266E RID: 9838 RVA: 0x000A39A4 File Offset: 0x000A1BA4
		// (set) Token: 0x0600266F RID: 9839 RVA: 0x000A39AC File Offset: 0x000A1BAC
		public int Index
		{
			get
			{
				return this._index;
			}
			private set
			{
				this._index = value;
			}
		}

		// Token: 0x170009AB RID: 2475
		// (get) Token: 0x06002670 RID: 9840 RVA: 0x000A39B5 File Offset: 0x000A1BB5
		public bool IsValid
		{
			get
			{
				return this.Index >= 0;
			}
		}

		// Token: 0x170009AC RID: 2476
		// (get) Token: 0x06002671 RID: 9841 RVA: 0x000A39C3 File Offset: 0x000A1BC3
		public IMapEntity MapEntity
		{
			get
			{
				if (this.IsMobile)
				{
					return this.MobileParty;
				}
				return this.Settlement;
			}
		}

		// Token: 0x170009AD RID: 2477
		// (get) Token: 0x06002672 RID: 9842 RVA: 0x000A39DA File Offset: 0x000A1BDA
		public IFaction MapFaction
		{
			get
			{
				if (this.MobileParty != null)
				{
					return this.MobileParty.MapFaction;
				}
				if (this.Settlement != null)
				{
					return this.Settlement.MapFaction;
				}
				return null;
			}
		}

		// Token: 0x170009AE RID: 2478
		// (get) Token: 0x06002673 RID: 9843 RVA: 0x000A3A05 File Offset: 0x000A1C05
		// (set) Token: 0x06002674 RID: 9844 RVA: 0x000A3A0D File Offset: 0x000A1C0D
		[SaveableProperty(210)]
		public int RandomValue { get; private set; } = MBRandom.RandomInt(1, int.MaxValue);

		// Token: 0x170009AF RID: 2479
		// (get) Token: 0x06002675 RID: 9845 RVA: 0x000A3A16 File Offset: 0x000A1C16
		public CultureObject Culture
		{
			get
			{
				return this.MapFaction.Culture;
			}
		}

		// Token: 0x170009B0 RID: 2480
		// (get) Token: 0x06002676 RID: 9846 RVA: 0x000A3A23 File Offset: 0x000A1C23
		public Tuple<uint, uint> PrimaryColorPair
		{
			get
			{
				if (this.MapFaction == null)
				{
					return new Tuple<uint, uint>(4291609515U, 4291609515U);
				}
				return new Tuple<uint, uint>(this.MapFaction.Color, this.MapFaction.Color2);
			}
		}

		// Token: 0x170009B1 RID: 2481
		// (get) Token: 0x06002677 RID: 9847 RVA: 0x000A3A58 File Offset: 0x000A1C58
		public Tuple<uint, uint> AlternativeColorPair
		{
			get
			{
				if (this.MapFaction == null)
				{
					return new Tuple<uint, uint>(4291609515U, 4291609515U);
				}
				return new Tuple<uint, uint>(this.MapFaction.AlternativeColor, this.MapFaction.AlternativeColor2);
			}
		}

		// Token: 0x170009B2 RID: 2482
		// (get) Token: 0x06002678 RID: 9848 RVA: 0x000A3A8D File Offset: 0x000A1C8D
		public Banner Banner
		{
			get
			{
				if (this.LeaderHero != null)
				{
					return this.LeaderHero.ClanBanner;
				}
				IFaction mapFaction = this.MapFaction;
				if (mapFaction == null)
				{
					return null;
				}
				return mapFaction.Banner;
			}
		}

		// Token: 0x06002679 RID: 9849 RVA: 0x000A3AB4 File Offset: 0x000A1CB4
		int IBattleCombatant.GetTacticsSkillAmount()
		{
			if (this.LeaderHero != null)
			{
				return this.LeaderHero.GetSkillValue(DefaultSkills.Tactics);
			}
			return 0;
		}

		// Token: 0x170009B3 RID: 2483
		// (get) Token: 0x0600267A RID: 9850 RVA: 0x000A3AD0 File Offset: 0x000A1CD0
		public MapEvent MapEvent
		{
			get
			{
				MapEventSide mapEventSide = this._mapEventSide;
				if (mapEventSide == null)
				{
					return null;
				}
				return mapEventSide.MapEvent;
			}
		}

		// Token: 0x170009B4 RID: 2484
		// (get) Token: 0x0600267B RID: 9851 RVA: 0x000A3AE3 File Offset: 0x000A1CE3
		// (set) Token: 0x0600267C RID: 9852 RVA: 0x000A3AEC File Offset: 0x000A1CEC
		public MapEventSide MapEventSide
		{
			get
			{
				return this._mapEventSide;
			}
			set
			{
				if (this._mapEventSide != value)
				{
					if (value != null && this.IsMobile && this.MapEvent != null && this.MapEvent.DefenderSide.LeaderParty == this)
					{
						Debug.FailedAssert(string.Format("Double MapEvent For {0}", this.Name), "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Party\\PartyBase.cs", "MapEventSide", 246);
					}
					if (this._mapEventSide != null)
					{
						this._mapEventSide.RemovePartyInternal(this);
					}
					this._mapEventSide = value;
					if (this._mapEventSide != null)
					{
						this._mapEventSide.AddPartyInternal(this);
					}
					if (this.MobileParty != null)
					{
						foreach (MobileParty mobileParty in this.MobileParty.AttachedParties)
						{
							mobileParty.Party.MapEventSide = this._mapEventSide;
						}
					}
				}
			}
		}

		// Token: 0x170009B5 RID: 2485
		// (get) Token: 0x0600267D RID: 9853 RVA: 0x000A3BDC File Offset: 0x000A1DDC
		public BattleSideEnum Side
		{
			get
			{
				MapEventSide mapEventSide = this.MapEventSide;
				if (mapEventSide == null)
				{
					return BattleSideEnum.None;
				}
				return mapEventSide.MissionSide;
			}
		}

		// Token: 0x170009B6 RID: 2486
		// (get) Token: 0x0600267E RID: 9854 RVA: 0x000A3BEF File Offset: 0x000A1DEF
		public BattleSideEnum OpponentSide
		{
			get
			{
				if (this.Side == BattleSideEnum.Attacker)
				{
					return BattleSideEnum.Defender;
				}
				return BattleSideEnum.Attacker;
			}
		}

		// Token: 0x0600267F RID: 9855 RVA: 0x000A3C00 File Offset: 0x000A1E00
		internal void AfterLoad()
		{
			if (this.RandomValue == 0)
			{
				this.RandomValue = MBRandom.RandomInt(1, int.MaxValue);
			}
			TroopRoster prisonRoster = this.PrisonRoster;
			if (prisonRoster != null && prisonRoster.Contains(CharacterObject.PlayerCharacter) && (this != Hero.MainHero.PartyBelongedToAsPrisoner || (Hero.MainHero.PartyBelongedTo != null && Hero.MainHero.PartyBelongedToAsPrisoner != null)))
			{
				MobileParty partyBelongedTo = Hero.MainHero.PartyBelongedTo;
				PartyBase mainParty = PartyBase.MainParty;
				if (partyBelongedTo == ((mainParty != null) ? mainParty.MobileParty : null))
				{
					this.PrisonRoster.AddToCounts(CharacterObject.PlayerCharacter, -1, false, 0, 0, true, -1);
				}
				else
				{
					PlayerCaptivity.CaptorParty = this;
				}
			}
			if (this.IsMobile && this.MobileParty.IsCaravan && !this.MobileParty.IsCurrentlyUsedByAQuest && this._customOwner != null && this.MobileParty.Owner != this.Owner)
			{
				this.SetCustomOwner(null);
			}
			foreach (TroopRosterElement troopRosterElement in this.PrisonRoster.GetTroopRoster())
			{
				if (troopRosterElement.Character.HeroObject != null && troopRosterElement.Character.HeroObject.PartyBelongedToAsPrisoner == null)
				{
					this.PrisonRoster.RemoveTroop(troopRosterElement.Character, 1, default(UniqueTroopDescriptor), 0);
				}
			}
			if (MBSaveLoad.IsUpdatingGameVersion && MBSaveLoad.LastLoadedGameVersion < ApplicationVersion.FromString("v1.2.0", 54620))
			{
				this.MemberRoster.RemoveZeroCounts();
			}
		}

		// Token: 0x06002680 RID: 9856 RVA: 0x000A3D90 File Offset: 0x000A1F90
		internal void InitCache()
		{
			this._partyMemberSizeLastCheckVersion = -1;
			this._prisonerSizeLastCheckVersion = -1;
			this._lastNumberOfMenWithHorseVersionNo = -1;
			this._lastNumberOfMenPerTierVersionNo = -1;
			this._lastMemberRosterVersionNo = -1;
		}

		// Token: 0x06002681 RID: 9857 RVA: 0x000A3DB5 File Offset: 0x000A1FB5
		[LoadInitializationCallback]
		private void OnLoad(MetaData metaData, ObjectLoadData objectLoadData)
		{
			this.InitCache();
		}

		// Token: 0x170009B7 RID: 2487
		// (get) Token: 0x06002682 RID: 9858 RVA: 0x000A3DC0 File Offset: 0x000A1FC0
		public int PartySizeLimit
		{
			get
			{
				int versionNo = this.MemberRoster.VersionNo;
				if (this._partyMemberSizeLastCheckVersion != versionNo || this._cachedPartyMemberSizeLimit == 0)
				{
					this._partyMemberSizeLastCheckVersion = versionNo;
					this._cachedPartyMemberSizeLimit = (int)Campaign.Current.Models.PartySizeLimitModel.GetPartyMemberSizeLimit(this, false).ResultNumber;
				}
				return this._cachedPartyMemberSizeLimit;
			}
		}

		// Token: 0x170009B8 RID: 2488
		// (get) Token: 0x06002683 RID: 9859 RVA: 0x000A3E1C File Offset: 0x000A201C
		public int PrisonerSizeLimit
		{
			get
			{
				int versionNo = this.MemberRoster.VersionNo;
				if (this._prisonerSizeLastCheckVersion != versionNo || this._cachedPrisonerSizeLimit == 0)
				{
					this._prisonerSizeLastCheckVersion = versionNo;
					this._cachedPrisonerSizeLimit = (int)Campaign.Current.Models.PartySizeLimitModel.GetPartyPrisonerSizeLimit(this, false).ResultNumber;
				}
				return this._cachedPrisonerSizeLimit;
			}
		}

		// Token: 0x170009B9 RID: 2489
		// (get) Token: 0x06002684 RID: 9860 RVA: 0x000A3E78 File Offset: 0x000A2078
		public ExplainedNumber PartySizeLimitExplainer
		{
			get
			{
				return Campaign.Current.Models.PartySizeLimitModel.GetPartyMemberSizeLimit(this, true);
			}
		}

		// Token: 0x170009BA RID: 2490
		// (get) Token: 0x06002685 RID: 9861 RVA: 0x000A3E90 File Offset: 0x000A2090
		public ExplainedNumber PrisonerSizeLimitExplainer
		{
			get
			{
				return Campaign.Current.Models.PartySizeLimitModel.GetPartyPrisonerSizeLimit(this, true);
			}
		}

		// Token: 0x170009BB RID: 2491
		// (get) Token: 0x06002686 RID: 9862 RVA: 0x000A3EA8 File Offset: 0x000A20A8
		public int NumberOfHealthyMembers
		{
			get
			{
				return this.MemberRoster.TotalManCount - this.MemberRoster.TotalWounded;
			}
		}

		// Token: 0x170009BC RID: 2492
		// (get) Token: 0x06002687 RID: 9863 RVA: 0x000A3EC1 File Offset: 0x000A20C1
		public int NumberOfRegularMembers
		{
			get
			{
				return this.MemberRoster.TotalRegulars;
			}
		}

		// Token: 0x170009BD RID: 2493
		// (get) Token: 0x06002688 RID: 9864 RVA: 0x000A3ECE File Offset: 0x000A20CE
		public int NumberOfWoundedTotalMembers
		{
			get
			{
				return this.MemberRoster.TotalWounded;
			}
		}

		// Token: 0x170009BE RID: 2494
		// (get) Token: 0x06002689 RID: 9865 RVA: 0x000A3EDB File Offset: 0x000A20DB
		public int NumberOfAllMembers
		{
			get
			{
				return this.MemberRoster.TotalManCount;
			}
		}

		// Token: 0x170009BF RID: 2495
		// (get) Token: 0x0600268A RID: 9866 RVA: 0x000A3EE8 File Offset: 0x000A20E8
		public int NumberOfPrisoners
		{
			get
			{
				return this.PrisonRoster.TotalManCount;
			}
		}

		// Token: 0x170009C0 RID: 2496
		// (get) Token: 0x0600268B RID: 9867 RVA: 0x000A3EF5 File Offset: 0x000A20F5
		public int NumberOfMounts
		{
			get
			{
				return this.ItemRoster.NumberOfMounts;
			}
		}

		// Token: 0x170009C1 RID: 2497
		// (get) Token: 0x0600268C RID: 9868 RVA: 0x000A3F02 File Offset: 0x000A2102
		public int NumberOfPackAnimals
		{
			get
			{
				return this.ItemRoster.NumberOfPackAnimals;
			}
		}

		// Token: 0x170009C2 RID: 2498
		// (get) Token: 0x0600268D RID: 9869 RVA: 0x000A3F0F File Offset: 0x000A210F
		public IEnumerable<CharacterObject> PrisonerHeroes
		{
			get
			{
				int num;
				for (int i = 0; i < this.PrisonRoster.Count; i = num + 1)
				{
					if (this.PrisonRoster.GetElementNumber(i) > 0)
					{
						TroopRosterElement elementCopyAtIndex = this.PrisonRoster.GetElementCopyAtIndex(i);
						if (elementCopyAtIndex.Character.IsHero)
						{
							yield return elementCopyAtIndex.Character;
						}
					}
					num = i;
				}
				yield break;
			}
		}

		// Token: 0x170009C3 RID: 2499
		// (get) Token: 0x0600268E RID: 9870 RVA: 0x000A3F1F File Offset: 0x000A211F
		public int NumberOfMenWithHorse
		{
			get
			{
				if (this._lastNumberOfMenWithHorseVersionNo != this.MemberRoster.VersionNo)
				{
					this.RecalculateNumberOfMenWithHorses();
					this._lastNumberOfMenWithHorseVersionNo = this.MemberRoster.VersionNo;
				}
				return this._numberOfMenWithHorse;
			}
		}

		// Token: 0x170009C4 RID: 2500
		// (get) Token: 0x0600268F RID: 9871 RVA: 0x000A3F51 File Offset: 0x000A2151
		public int NumberOfMenWithoutHorse
		{
			get
			{
				return this.NumberOfAllMembers - this.NumberOfMenWithHorse;
			}
		}

		// Token: 0x06002690 RID: 9872 RVA: 0x000A3F60 File Offset: 0x000A2160
		public int GetNumberOfHealthyMenOfTier(int tier)
		{
			if (tier < 0)
			{
				Debug.FailedAssert("Requested men count for negative tier.", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Party\\PartyBase.cs", "GetNumberOfHealthyMenOfTier", 461);
				return 0;
			}
			bool flag = false;
			if (this._numberOfHealthyMenPerTier == null || tier >= this._numberOfHealthyMenPerTier.Length)
			{
				int num = MathF.Max(tier, 6);
				this._numberOfHealthyMenPerTier = new int[num + 1];
				flag = true;
			}
			else if (this._lastNumberOfMenPerTierVersionNo != this.MemberRoster.VersionNo)
			{
				flag = true;
			}
			if (flag)
			{
				for (int i = 0; i < this._numberOfHealthyMenPerTier.Length; i++)
				{
					this._numberOfHealthyMenPerTier[i] = 0;
				}
				for (int j = 0; j < this.MemberRoster.Count; j++)
				{
					CharacterObject characterAtIndex = this.MemberRoster.GetCharacterAtIndex(j);
					if (characterAtIndex != null && !characterAtIndex.IsHero)
					{
						int tier2 = characterAtIndex.Tier;
						if (tier2 >= 0 && tier2 < this._numberOfHealthyMenPerTier.Length)
						{
							int num2 = this.MemberRoster.GetElementNumber(j) - this.MemberRoster.GetElementWoundedNumber(j);
							this._numberOfHealthyMenPerTier[tier2] += num2;
						}
					}
				}
				this._lastNumberOfMenPerTierVersionNo = this.MemberRoster.VersionNo;
			}
			return this._numberOfHealthyMenPerTier[tier];
		}

		// Token: 0x170009C5 RID: 2501
		// (get) Token: 0x06002691 RID: 9873 RVA: 0x000A4084 File Offset: 0x000A2284
		public int InventoryCapacity
		{
			get
			{
				if (this.MobileParty == null)
				{
					return 100;
				}
				return (int)Campaign.Current.Models.InventoryCapacityModel.CalculateInventoryCapacity(this.MobileParty, false, 0, 0, 0, false).ResultNumber;
			}
		}

		// Token: 0x170009C6 RID: 2502
		// (get) Token: 0x06002692 RID: 9874 RVA: 0x000A40C4 File Offset: 0x000A22C4
		public float TotalStrength
		{
			get
			{
				if (this._lastMemberRosterVersionNo == this.MemberRoster.VersionNo)
				{
					return this._cachedTotalStrength;
				}
				this._cachedTotalStrength = this.CalculateStrength();
				this._lastMemberRosterVersionNo = this.MemberRoster.VersionNo;
				return this._cachedTotalStrength;
			}
		}

		// Token: 0x06002693 RID: 9875 RVA: 0x000A4103 File Offset: 0x000A2303
		public PartyBase(MobileParty mobileParty) : this(mobileParty, null)
		{
		}

		// Token: 0x06002694 RID: 9876 RVA: 0x000A410D File Offset: 0x000A230D
		public PartyBase(Settlement settlement) : this(null, settlement)
		{
		}

		// Token: 0x06002695 RID: 9877 RVA: 0x000A4118 File Offset: 0x000A2318
		private PartyBase(MobileParty mobileParty, Settlement settlement)
		{
			this.Index = Campaign.Current.GeneratePartyId(this);
			this.MobileParty = mobileParty;
			this.Settlement = settlement;
			this.ItemRoster = new ItemRoster();
			this.MemberRoster = new TroopRoster(this);
			this.PrisonRoster = new TroopRoster(this);
			this.MemberRoster.NumberChangedCallback = new NumberChangedCallback(this.MemberRosterNumberChanged);
			this.PrisonRoster.IsPrisonRoster = true;
		}

		// Token: 0x06002696 RID: 9878 RVA: 0x000A41AC File Offset: 0x000A23AC
		private void RecalculateNumberOfMenWithHorses()
		{
			this._numberOfMenWithHorse = 0;
			for (int i = 0; i < this.MemberRoster.Count; i++)
			{
				TroopRosterElement elementCopyAtIndex = this.MemberRoster.GetElementCopyAtIndex(i);
				if (elementCopyAtIndex.Character != null && elementCopyAtIndex.Character.IsMounted)
				{
					this._numberOfMenWithHorse += elementCopyAtIndex.Number;
				}
			}
		}

		// Token: 0x06002697 RID: 9879 RVA: 0x000A420C File Offset: 0x000A240C
		public int GetNumberOfMenWith(TraitObject trait)
		{
			int num = 0;
			foreach (TroopRosterElement troopRosterElement in this.MemberRoster.GetTroopRoster())
			{
				if (troopRosterElement.Character.GetTraitLevel(trait) > 0)
				{
					num += troopRosterElement.Number;
				}
			}
			return num;
		}

		// Token: 0x06002698 RID: 9880 RVA: 0x000A427C File Offset: 0x000A247C
		public int AddPrisoner(CharacterObject element, int numberToAdd)
		{
			return this.PrisonRoster.AddToCounts(element, numberToAdd, false, 0, 0, true, -1);
		}

		// Token: 0x06002699 RID: 9881 RVA: 0x000A4290 File Offset: 0x000A2490
		public int AddMember(CharacterObject element, int numberToAdd, int numberToAddWounded = 0)
		{
			return this.MemberRoster.AddToCounts(element, numberToAdd, false, numberToAddWounded, 0, true, -1);
		}

		// Token: 0x0600269A RID: 9882 RVA: 0x000A42A4 File Offset: 0x000A24A4
		public void AddPrisoners(TroopRoster roster)
		{
			foreach (TroopRosterElement troopRosterElement in roster.GetTroopRoster())
			{
				this.AddPrisoner(troopRosterElement.Character, troopRosterElement.Number);
			}
		}

		// Token: 0x0600269B RID: 9883 RVA: 0x000A4304 File Offset: 0x000A2504
		public void AddMembers(TroopRoster roster)
		{
			this.MemberRoster.Add(roster);
		}

		// Token: 0x0600269C RID: 9884 RVA: 0x000A4312 File Offset: 0x000A2512
		public override string ToString()
		{
			if (!this.IsSettlement)
			{
				return this.MobileParty.Name.ToString();
			}
			return this.Settlement.Name.ToString();
		}

		// Token: 0x0600269D RID: 9885 RVA: 0x000A4340 File Offset: 0x000A2540
		public void PlaceRandomPositionAroundPosition(Vec2 centerPosition, float radius)
		{
			Vec2 vec = new Vec2(0f, 0f);
			bool flag;
			do
			{
				vec.x = centerPosition.x + MBRandom.RandomFloat * radius * 2f - radius;
				vec.y = centerPosition.y + MBRandom.RandomFloat * radius * 2f - radius;
				PathFaceRecord faceIndex = Campaign.Current.MapSceneWrapper.GetFaceIndex(vec);
				PathFaceRecord faceIndex2 = Campaign.Current.MapSceneWrapper.GetFaceIndex(centerPosition);
				flag = Campaign.Current.MapSceneWrapper.AreFacesOnSameIsland(faceIndex, faceIndex2, false);
			}
			while (!flag);
			if (this.IsMobile)
			{
				this.MobileParty.Position2D = vec;
				this.MobileParty.Ai.SetMoveModeHold();
			}
		}

		// Token: 0x0600269E RID: 9886 RVA: 0x000A43F4 File Offset: 0x000A25F4
		public int AddElementToMemberRoster(CharacterObject element, int numberToAdd, bool insertAtFront = false)
		{
			return this.MemberRoster.AddToCounts(element, numberToAdd, insertAtFront, 0, 0, true, -1);
		}

		// Token: 0x0600269F RID: 9887 RVA: 0x000A4408 File Offset: 0x000A2608
		public void AddToMemberRosterElementAtIndex(int index, int numberToAdd, int woundedCount = 0)
		{
			this.MemberRoster.AddToCountsAtIndex(index, numberToAdd, woundedCount, 0, true);
		}

		// Token: 0x060026A0 RID: 9888 RVA: 0x000A441B File Offset: 0x000A261B
		public void WoundMemberRosterElements(CharacterObject elementObj, int numberToWound)
		{
			this.MemberRoster.AddToCounts(elementObj, 0, false, numberToWound, 0, true, -1);
		}

		// Token: 0x060026A1 RID: 9889 RVA: 0x000A4430 File Offset: 0x000A2630
		public void WoundMemberRosterElementsWithIndex(int elementIndex, int numberToWound)
		{
			this.MemberRoster.AddToCountsAtIndex(elementIndex, 0, numberToWound, 0, true);
		}

		// Token: 0x060026A2 RID: 9890 RVA: 0x000A4444 File Offset: 0x000A2644
		private float CalculateStrength()
		{
			float num = 0f;
			float leaderModifier = 0f;
			MapEvent.PowerCalculationContext context = MapEvent.PowerCalculationContext.Default;
			BattleSideEnum side = BattleSideEnum.Defender;
			if (this.MapEvent != null)
			{
				leaderModifier = Campaign.Current.Models.MilitaryPowerModel.GetLeaderModifierInMapEvent(this.MapEvent, this.Side);
				context = this.MapEvent.SimulationContext;
			}
			for (int i = 0; i < this.MemberRoster.Count; i++)
			{
				TroopRosterElement elementCopyAtIndex = this.MemberRoster.GetElementCopyAtIndex(i);
				if (elementCopyAtIndex.Character != null)
				{
					float troopPower = Campaign.Current.Models.MilitaryPowerModel.GetTroopPower(elementCopyAtIndex.Character, side, context, leaderModifier);
					num += (float)(elementCopyAtIndex.Number - elementCopyAtIndex.WoundedNumber) * troopPower;
				}
			}
			return num;
		}

		// Token: 0x060026A3 RID: 9891 RVA: 0x000A4500 File Offset: 0x000A2700
		internal bool GetCharacterFromPartyRank(int partyRank, out CharacterObject character, out PartyBase party, out int stackIndex, bool includeWoundeds = false)
		{
			for (int i = 0; i < this.MemberRoster.Count; i++)
			{
				TroopRosterElement elementCopyAtIndex = this.MemberRoster.GetElementCopyAtIndex(i);
				if (!elementCopyAtIndex.Character.IsHero)
				{
					int num = elementCopyAtIndex.Number - (includeWoundeds ? 0 : elementCopyAtIndex.WoundedNumber);
					partyRank -= num;
					if (partyRank <= 0)
					{
						character = elementCopyAtIndex.Character;
						party = this;
						stackIndex = i;
						return true;
					}
				}
			}
			character = null;
			party = null;
			stackIndex = 0;
			return false;
		}

		// Token: 0x060026A4 RID: 9892 RVA: 0x000A457C File Offset: 0x000A277C
		public static bool IsPositionOkForTraveling(Vec2 position)
		{
			IMapScene mapSceneWrapper = Campaign.Current.MapSceneWrapper;
			PathFaceRecord faceIndex = mapSceneWrapper.GetFaceIndex(position);
			if (!faceIndex.IsValid())
			{
				return false;
			}
			TerrainType faceTerrainType = mapSceneWrapper.GetFaceTerrainType(faceIndex);
			return PartyBase.ValidTerrainTypes.Contains(faceTerrainType);
		}

		// Token: 0x060026A5 RID: 9893 RVA: 0x000A45BA File Offset: 0x000A27BA
		private void MemberRosterNumberChanged(bool numberChanged, bool woundedNumberChanged, bool heroNumberChanged)
		{
			if (numberChanged || heroNumberChanged)
			{
				CampaignEventDispatcher.Instance.OnPartySizeChanged(this);
			}
		}

		// Token: 0x060026A6 RID: 9894 RVA: 0x000A45CC File Offset: 0x000A27CC
		public void UpdateVisibilityAndInspected(float mainPartySeeingRange = 0f)
		{
			bool flag = false;
			bool isInspected = false;
			if (this.IsSettlement)
			{
				flag = true;
				ISpottable spottable;
				if ((spottable = (this.Settlement.SettlementComponent as ISpottable)) != null && !spottable.IsSpotted)
				{
					flag = false;
				}
				if (flag)
				{
					isInspected = PartyBase.CalculateSettlementInspected(this.Settlement, mainPartySeeingRange);
				}
			}
			else if (this.MobileParty.IsActive)
			{
				if (Campaign.Current.TrueSight)
				{
					flag = true;
				}
				else
				{
					if (this.MobileParty.CurrentSettlement != null)
					{
						Hero leaderHero = this.MobileParty.LeaderHero;
						if (((leaderHero != null) ? leaderHero.ClanBanner : null) == null && (this.MobileParty.MapEvent == null || !this.MobileParty.MapEvent.IsSiegeAssault || this.MobileParty.Party.Side != BattleSideEnum.Attacker))
						{
							goto IL_C9;
						}
					}
					PartyBase.CalculateVisibilityAndInspected(this.MobileParty, out flag, out isInspected, mainPartySeeingRange);
				}
			}
			IL_C9:
			if (this.IsSettlement)
			{
				this.Settlement.IsVisible = flag;
				this.Settlement.IsInspected = isInspected;
				return;
			}
			this.MobileParty.IsVisible = flag;
			this.MobileParty.IsInspected = isInspected;
		}

		// Token: 0x060026A7 RID: 9895 RVA: 0x000A46DC File Offset: 0x000A28DC
		private static void CalculateVisibilityAndInspected(IMapPoint mapPoint, out bool isVisible, out bool isInspected, float mainPartySeeingRange = 0f)
		{
			isInspected = false;
			MobileParty mobileParty = mapPoint as MobileParty;
			if (((mobileParty != null) ? mobileParty.Army : null) != null && mobileParty.Army.LeaderParty.AttachedParties.IndexOf(mobileParty) >= 0)
			{
				isVisible = mobileParty.Army.LeaderParty.IsVisible;
				return;
			}
			if (mobileParty != null && MobileParty.MainParty.CurrentSettlement != null && MobileParty.MainParty.CurrentSettlement.SiegeEvent != null && MobileParty.MainParty.CurrentSettlement.SiegeEvent.BesiegerCamp.IsBesiegerSideParty(mobileParty))
			{
				isVisible = true;
				return;
			}
			float num = PartyBase.CalculateVisibilityRangeOfMapPoint(mapPoint, mainPartySeeingRange);
			isVisible = (num > 1f && mapPoint.IsActive);
			if (isVisible)
			{
				if (mapPoint.IsInspected)
				{
					isInspected = true;
					return;
				}
				isInspected = (1f / num < Campaign.Current.Models.MapVisibilityModel.GetPartyRelativeInspectionRange(mapPoint));
			}
		}

		// Token: 0x060026A8 RID: 9896 RVA: 0x000A47B8 File Offset: 0x000A29B8
		private static bool CalculateSettlementInspected(IMapPoint mapPoint, float mainPartySeeingRange = 0f)
		{
			return 1f / PartyBase.CalculateVisibilityRangeOfMapPoint(mapPoint, mainPartySeeingRange) < Campaign.Current.Models.MapVisibilityModel.GetPartyRelativeInspectionRange(mapPoint);
		}

		// Token: 0x060026A9 RID: 9897 RVA: 0x000A47E0 File Offset: 0x000A29E0
		private static float CalculateVisibilityRangeOfMapPoint(IMapPoint mapPoint, float mainPartySeeingRange)
		{
			MobileParty mainParty = MobileParty.MainParty;
			float lengthSquared = (mainParty.Position2D - mapPoint.Position2D).LengthSquared;
			float num = mainPartySeeingRange;
			if (mainPartySeeingRange == 0f)
			{
				num = mainParty.SeeingRange;
			}
			float num2 = num * num / lengthSquared;
			float num3 = 0.25f;
			MobileParty party;
			if ((party = (mapPoint as MobileParty)) != null)
			{
				num3 = Campaign.Current.Models.MapVisibilityModel.GetPartySpottingDifficulty(mainParty, party);
			}
			return num2 / num3;
		}

		// Token: 0x170009C7 RID: 2503
		// (get) Token: 0x060026AA RID: 9898 RVA: 0x000A4851 File Offset: 0x000A2A51
		// (set) Token: 0x060026AB RID: 9899 RVA: 0x000A4859 File Offset: 0x000A2A59
		[SaveableProperty(12)]
		public float AverageBearingRotation { get; set; }

		// Token: 0x170009C8 RID: 2504
		// (get) Token: 0x060026AC RID: 9900 RVA: 0x000A4862 File Offset: 0x000A2A62
		public BasicCultureObject BasicCulture
		{
			get
			{
				return this.Culture;
			}
		}

		// Token: 0x170009C9 RID: 2505
		// (get) Token: 0x060026AD RID: 9901 RVA: 0x000A486C File Offset: 0x000A2A6C
		public BasicCharacterObject General
		{
			get
			{
				MobileParty mobileParty = this.MobileParty;
				if (((mobileParty != null) ? mobileParty.Army : null) != null)
				{
					MobileParty leaderParty = this.MobileParty.Army.LeaderParty;
					if (leaderParty == null)
					{
						return null;
					}
					Hero leaderHero = leaderParty.LeaderHero;
					if (leaderHero == null)
					{
						return null;
					}
					return leaderHero.CharacterObject;
				}
				else
				{
					Hero leaderHero2 = this.LeaderHero;
					if (leaderHero2 == null)
					{
						return null;
					}
					return leaderHero2.CharacterObject;
				}
			}
		}

		// Token: 0x060026AE RID: 9902 RVA: 0x000A48C5 File Offset: 0x000A2AC5
		public void SetAsCameraFollowParty()
		{
			Campaign.Current.CameraFollowParty = this;
		}

		// Token: 0x060026AF RID: 9903 RVA: 0x000A48D2 File Offset: 0x000A2AD2
		internal void OnFinishLoadState()
		{
			this.SetVisualAsDirty();
			MobileParty mobileParty = this.MobileParty;
			if (mobileParty != null)
			{
				mobileParty.OnFinishLoadState();
			}
			this.MemberRoster.NumberChangedCallback = new NumberChangedCallback(this.MemberRosterNumberChanged);
		}

		// Token: 0x170009CA RID: 2506
		// (get) Token: 0x060026B0 RID: 9904 RVA: 0x000A4902 File Offset: 0x000A2B02
		// (set) Token: 0x060026B1 RID: 9905 RVA: 0x000A490A File Offset: 0x000A2B0A
		[CachedData]
		public bool IsVisualDirty { get; private set; }

		// Token: 0x060026B2 RID: 9906 RVA: 0x000A4913 File Offset: 0x000A2B13
		public void SetVisualAsDirty()
		{
			this.IsVisualDirty = true;
		}

		// Token: 0x060026B3 RID: 9907 RVA: 0x000A491C File Offset: 0x000A2B1C
		public void OnVisualsUpdated()
		{
			this.IsVisualDirty = false;
		}

		// Token: 0x060026B4 RID: 9908 RVA: 0x000A4925 File Offset: 0x000A2B25
		internal void OnHeroAdded(Hero heroObject)
		{
			MobileParty mobileParty = this.MobileParty;
			if (mobileParty == null)
			{
				return;
			}
			mobileParty.OnHeroAdded(heroObject);
		}

		// Token: 0x060026B5 RID: 9909 RVA: 0x000A4938 File Offset: 0x000A2B38
		internal void OnHeroRemoved(Hero heroObject)
		{
			MobileParty mobileParty = this.MobileParty;
			if (mobileParty == null)
			{
				return;
			}
			mobileParty.OnHeroRemoved(heroObject);
		}

		// Token: 0x060026B6 RID: 9910 RVA: 0x000A494B File Offset: 0x000A2B4B
		internal void OnHeroAddedAsPrisoner(Hero heroObject)
		{
			heroObject.OnAddedToPartyAsPrisoner(this);
		}

		// Token: 0x060026B7 RID: 9911 RVA: 0x000A4954 File Offset: 0x000A2B54
		internal void OnHeroRemovedAsPrisoner(Hero heroObject)
		{
			heroObject.OnRemovedFromPartyAsPrisoner(this);
		}

		// Token: 0x060026B8 RID: 9912 RVA: 0x000A495D File Offset: 0x000A2B5D
		public void ResetTempXp()
		{
			this.MemberRoster.ClearTempXp();
		}

		// Token: 0x060026B9 RID: 9913 RVA: 0x000A496A File Offset: 0x000A2B6A
		public void OnGameInitialized()
		{
			if (this.IsMobile)
			{
				this.MobileParty.OnGameInitialized();
				return;
			}
			if (this.IsSettlement)
			{
				this.Settlement.OnGameInitialized();
			}
		}

		// Token: 0x04000B80 RID: 2944
		private static readonly HashSet<TerrainType> ValidTerrainTypes = new HashSet<TerrainType>
		{
			TerrainType.Snow,
			TerrainType.Steppe,
			TerrainType.Plain,
			TerrainType.Desert,
			TerrainType.Swamp,
			TerrainType.Dune,
			TerrainType.Bridge,
			TerrainType.Forest,
			TerrainType.Fording
		};

		// Token: 0x04000B86 RID: 2950
		[SaveableField(15)]
		private int _remainingFoodPercentage;

		// Token: 0x04000B87 RID: 2951
		[SaveableField(182)]
		private CampaignTime _lastEatingTime = CampaignTime.Now;

		// Token: 0x04000B88 RID: 2952
		[SaveableField(8)]
		private Hero _customOwner;

		// Token: 0x04000B8A RID: 2954
		[SaveableField(9)]
		private int _index;

		// Token: 0x04000B8C RID: 2956
		[SaveableField(200)]
		private MapEventSide _mapEventSide;

		// Token: 0x04000B8D RID: 2957
		[CachedData]
		private int _lastMemberRosterVersionNo;

		// Token: 0x04000B8E RID: 2958
		[CachedData]
		private int _partyMemberSizeLastCheckVersion;

		// Token: 0x04000B8F RID: 2959
		[CachedData]
		private int _cachedPartyMemberSizeLimit;

		// Token: 0x04000B90 RID: 2960
		[CachedData]
		private int _prisonerSizeLastCheckVersion;

		// Token: 0x04000B91 RID: 2961
		[CachedData]
		private int _cachedPrisonerSizeLimit;

		// Token: 0x04000B92 RID: 2962
		[CachedData]
		private int _lastNumberOfMenWithHorseVersionNo;

		// Token: 0x04000B93 RID: 2963
		[CachedData]
		private int _lastNumberOfMenPerTierVersionNo;

		// Token: 0x04000B94 RID: 2964
		[SaveableField(17)]
		private int _numberOfMenWithHorse;

		// Token: 0x04000B95 RID: 2965
		private int[] _numberOfHealthyMenPerTier;

		// Token: 0x04000B96 RID: 2966
		[CachedData]
		private float _cachedTotalStrength;
	}
}
